package com.ruoyi.contract.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 租赁合同对象 contract
 * 
 * @author haoxingshuang
 * @date 2025-07-31
 */

@TableName(value ="contract")
@Data
public class Contract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String contractNo;

    /** 房源ID */
    @Excel(name = "房源ID")
    private Long houseId;

    /** 房东ID */
    @Excel(name = "房东ID")
    private Long landlordId;

    /** 租户ID */
    @Excel(name = "租户ID")
    private Long tenantId;

    /** 管家ID */
    @Excel(name = "管家ID")
    private Long butlerId;

    /** 开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 月租金 */
    @Excel(name = "月租金")
    private BigDecimal rentAmount;

    /** 押金 */
    @Excel(name = "押金")
    private BigDecimal depositAmount;

    /** 付款周期(月) */
    @Excel(name = "付款周期(月)")
    private Long paymentCycle;

    /** 付款日 */
    @Excel(name = "付款日")
    private Long paymentDay;

    /** 状态（0待审核 1已生效 2已到期 3已终止） */
    @Excel(name = "状态" )
    private Long status;

    /** 签约时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签约时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signTime;

    /** 签约地点 */
    @Excel(name = "签约地点")
    private String signAddress;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approveTime;

    /** 审批人 */
    @Excel(name = "审批人")
    private String approveBy;

    /** 终止原因 */
    @Excel(name = "终止原因")
    private String terminateReason;

    /** 房东姓名 */
    @TableField(exist = false)
    private String landlordName;
    @TableField(exist = false)
    /** 租户姓名 */
    private String customerName;
    @TableField(exist = false)
    /** 管家姓名 */
    private String butlerName;


}
